-
Notifications
You must be signed in to change notification settings - Fork 287
Txgen: HighCallData GenMode uses erc20 call with 2^15 bytes calldata #2431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the execution submodule bump intended?
|
HighCallData also needs to require the Erc20 contract to be deployed |
8b98a94 to
2c09b83
Compare
2c09b83 to
252ed95
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the HighCallData generator to use ERC20 contract calls with large calldata (2^15 bytes) instead of deployment transactions. The change addresses an issue where transactions with insufficient gas limits are now rejected at the RPC level rather than during execution, requiring a new approach to stress-test block filling, proposal creation, and raptor cast.
Key changes:
- Removed the
HighCallDataLowGasLimitgeneration mode entirely - Modified
HighCallDatagenerator to use ERC20 contract calls with 2KB calldata instead of deployment transactions - Made the
make_txhelper function public to support the new implementation
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| monad-eth-testutil/examples/txgen/shared/erc20.rs | Made make_tx function public for use in high calldata generation |
| monad-eth-testutil/examples/txgen/generators/mod.rs | Updated HighCallData generator initialization to use ERC20 contract and removed HighCallDataLowGasLimit mode |
| monad-eth-testutil/examples/txgen/generators/high_call_data.rs | Replaced deployment-based approach with new high_calldata_erc20_call function that creates contract calls with large calldata |
| monad-eth-testutil/examples/txgen/config.rs | Removed all configuration entries for deprecated HighCallDataLowGasLimit mode |
| monad-eth-testutil/examples/txgen/cli.rs | Removed CLI option for deprecated HighCallDataLowGasLimit mode |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ctx: &GenCtx, | ||
| ) -> TxEnvelope { | ||
| let max_fee_per_gas = ctx.base_fee * 2; | ||
| let input = vec![0u8; 2 << 10]; |
Copilot
AI
Oct 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bit shift operation 2 << 10 evaluates to 2048 (2 * 2^10), but the PR description states the calldata should be 2^15 bytes (32768 bytes). This should be 1 << 15 or 32768 to match the intended size.
| let input = vec![0u8; 2 << 10]; | |
| let input = vec![0u8; 1 << 15]; |
| from.nonce += 1; | ||
| from.native_bal = from | ||
| .native_bal | ||
| .checked_sub(U256::from(400_000 * max_fee_per_gas)) |
Copilot
AI
Oct 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number 400_000 for gas estimation is hardcoded. Consider defining this as a named constant (e.g., ESTIMATED_GAS_USAGE) to improve code clarity and maintainability.
Previously high call data txs with too low gas limit were not rejected until getting to execution, but now they are rejected at rpc. This means that we cannot fill blocks to stress proposal creation and raptor cast. This pr fixes this
252ed95 to
0ce1a04
Compare
Previously high call data txs with too low gas limit were not rejected until getting to execution, but now they are rejected at rpc. This means that we cannot fill blocks to stress proposal creation and raptor cast. This pr fixes this